using Handday.Erp.Transfer.Models.EightTradingTransfer;
using HandDay.Framework.Core.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Handday.Erp.Transfer.Repositories
{
    /// <summary>
    /// 8项交易统计数据
    /// </summary>
    public interface IEightTradingDapperRepository : ITransientDependency
    {
        /// <summary>
        /// 统计8项交易数据
        /// </summary>
        /// <param name="corpId">企业编号</param>
        /// <param name="time">时间段：key->startTime;value->endTime</param>
        /// <returns></returns>
        Task<IEnumerable<EightTradingTransferDto>> StatisticAsync(ulong corpId, Dictionary<DateTimeOffset, DateTimeOffset> time);

        /// <summary>
        /// 清除数据
        /// </summary>
        Task ClearAsync(ulong corpId, DateTimeOffset time);

        /// <summary>
        /// 初始化表
        /// </summary>
        /// <param name="corpId">企业编号</param>
        Task<bool> InitTableAsync(ulong corpId);
    }
}
